<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <title>书签同步</title>
  <style>
    body {
      width: 300px;
      padding: 10px;
      font-family: Arial, sans-serif;
    }
    h1 {
      font-size: 16px;
      margin-bottom: 10px;
    }
    input, button {
      padding: 10px;
      width: 100%;
      font-size: 14px;
      margin-top: 5px;
      box-sizing: border-box;
    }
    .page {
      display: none;
    }
    .page.active {
      display: block;
    }
    .progress-bar {
      width: 100%;
      background-color: #f3f3f3;
      border-radius: 4px;
      margin-top: 10px;
      height: 20px;
    }
    .progress-bar-fill {
      height: 100%;
      width: 0%;
      background-color: #4caf50;
      border-radius: 4px;
      transition: width 0.3s ease;
    }
  </style>
</head>
<body>
  <div id="mainPage" class="page active">
    <h1>书签同步插件</h1>
    <button id="openSettings">打开设置</button>
    <button id="syncBtn" title="会覆盖远程数据">同步到远程</button>
    <button id="importBtn" title="会覆盖本地书签">从远程导入</button>
    <button id="removeAllBtn" style="display: none;">删除书签栏所有书签</button>
    <button id="historyBtn" >导入历史版本</button>
    <button id="getTokenBtn" style="margin-top: 10px;">获取Token</button>
    <div class="progress-bar" id="progressBarDiv" style="display: none;">
      <div class="progress-bar-fill" id="progressBar"></div>
    </div>
    <p id="status" style="margin-top: 10px;"></p>
    
  </div>

  <div id="settingsPage" class="page">
    <h1>Git 设置</h1>
    <input type="text" id="token" placeholder="Git令牌" title="gitee具有 repo 权限的个人访问令牌 ">
    <div class="advanced-settings" style="overflow: hidden; transition: max-height 0.3s ease-out; max-height: 0;">
      <input type="text" id="repoName" placeholder="仓库名称">
      <input type="text" id="fileName" placeholder="文件名">
    </div>
    <button id="toggleAdvanced" style="margin-top: 10px; width: 100%;">显示高级设置</button>
    <div style="margin-top: 10px;">
      <label style="display: flex; align-items: center; justify-content: space-between; padding: 10px; background-color: #f0f0f0; border-radius: 4px;">
        <span>自动同步书签</span>
        <input type="checkbox" id="autoSyncCheckbox" style="width: auto; height: auto; margin: 0;">
      </label>
    </div>
    <button id="saveSettings">保存设置</button>
    <button id="cancelSettings">取消</button>
  </div>

  <script type="module" src="../js/popup.js"></script>
</body>
</html>